<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<%@ taglib tagdir="/WEB-INF/tags" prefix="matrix"%>
<%@ taglib uri="http://matrixcsm.zkingsoft.com" prefix="cms"%>
<cms:ads   code="'img_Sqsh00',
'ZY_1_1_1',
'ZY_LianXiWoMen_2',
'ZY_LianXiWoMen_3',
'img_hJkyE4',
'ZY_GongSi_5',
'ZY_HuNanXingXinShengWu_6_11',
'img_U4c547',
'ZY_DianHua_8',
'ZY_9_9_11',
'img_XeDJr10',
'ZY_YouXiang_11',
'ZY_12_12_11',
'img_uTj5I13',
'ZY_DiZhi_14',
'ZY_ZhangShaShiYueLuQu_15',
'ZY_ZaiXianLiuYan_16',
'ZY_XingMing_17',
'ZY_DianHua_18',
'ZY_YouXiang_19',
'ZY_GongSiMingCheng_20',
'ZY_LeiXing_21',
'ZY_XunJia_22',
'ZY_ShenQingYangPin_23',
'ZY_QiTa_24',
'ZY_BiaoTi_25',
'ZY_MiaoShu_26',
'ZY_WoYiYueDuBingTong_27',
'ZY_TiJiao_28'
"  ></cms:ads>
<!doctype html>
<html>
 <head>
  <link rel="icon" sizes="any" href="${浏览器logo}">
  <title>${网页标题}</title>
  <meta charset="UTF-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <link rel="stylesheet" href="https://hwfile.csxuncong.com/xxsw/pc/css/swiper.min.css"> 
  <link rel="stylesheet" href="https://hwfile.csxuncong.com/xxsw/pc/css/animate.css"> 
  <link rel="stylesheet" href="https://hwfile.csxuncong.com/xxsw/pc/css/common.css"> 
  <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]--> 
  <style>.box { margin: 60px 0 0; padding-bottom: 30px; border: 1px solid rgb(47 55 47 / 20%); } .box .m-title { background: #f5f5f5; font-weight: bold; font-size: 20px; color: #3EA836; padding: 20px 25px; } .box .item{ padding: 0 40px; width: 50%; box-sizing: border-box; margin-top: 30px; } .box .item .icon{ width: 20px; margin-right: 5px; } .box .item .name{ color: #2F372F; font-size: 16px; } .box .item .desc{ font-size: 15px; margin-top: 10px; color: rgb(47 55 47 / 70%); }</style> 
  <meta name="keywords" content="${网页关键词}">
  <meta name="description" content="${网页描述 }">
 </head> 
 <body> 
  <jsp:include page="_top.jsp"></jsp:include> 
  <div class="crumbs-wrap"> 
   <div class="container"> 
    <a href="index.html"><img src="${img_Sqsh00.adImg}" alt="" class="zy" data-type="ad" data-id="${img_Sqsh00.adId}"></a> 
    <span class="zy" data-type="ad" data-id="${ZY_1_1_1.adId}">${ZY_1_1_1.adTitle}</span>
    <a class="active zy" href="${ZY_LianXiWoMen_2.adUrl}" data-type="ad" data-id="${ZY_LianXiWoMen_2.adId}">${ZY_LianXiWoMen_2.adTitle}</a> 
   </div> 
  </div> 
  <div class="container"> 
   <div class="box"> 
    <h1 class="m-title zy" data-type="ad" data-id="${ZY_LianXiWoMen_3.adId}">${ZY_LianXiWoMen_3.adTitle}</h1> 
    <div class="flex flex-wrap"> 
     <div class="item"> 
      <div class="flex align-center"> 
       <img src="${img_hJkyE4.adImg}" alt="" class="icon zy" data-type="ad" data-id="${img_hJkyE4.adId}"> 
       <h2 class="name zy" data-type="ad" data-id="${ZY_GongSi_5.adId}">${ZY_GongSi_5.adTitle}</h2> 
      </div> 
      <p class="desc zy" data-type="ad" data-id="${ZY_HuNanXingXinShengWu_6_11.adId}">${ZY_HuNanXingXinShengWu_6_11.adTitle}</p>
     </div> 
     <div class="item"> 
      <div class="flex align-center"> 
       <img src="${img_U4c547.adImg}" alt="" class="icon zy" data-type="ad" data-id="${img_U4c547.adId}"> 
       <h2 class="name zy" data-type="ad" data-id="${ZY_DianHua_8.adId}">${ZY_DianHua_8.adTitle}</h2> 
      </div> 
      <p class="desc zy" data-type="ad" data-id="${ZY_9_9_11.adId}">${ZY_9_9_11.adTitle}</p>
     </div> 
     <div class="item"> 
      <div class="flex align-center"> 
       <img src="${img_XeDJr10.adImg}" alt="" class="icon zy" data-type="ad" data-id="${img_XeDJr10.adId}"> 
       <h2 class="name zy" data-type="ad" data-id="${ZY_YouXiang_11.adId}">${ZY_YouXiang_11.adTitle}</h2> 
      </div> 
      <p class="desc zy" data-type="ad" data-id="${ZY_12_12_11.adId}">${ZY_12_12_11.adTitle}</p>
     </div> 
     <div class="item"> 
      <div class="flex align-center"> 
       <img src="${img_uTj5I13.adImg}" alt="" class="icon zy" data-type="ad" data-id="${img_uTj5I13.adId}"> 
       <h2 class="name zy" data-type="ad" data-id="${ZY_DiZhi_14.adId}">${ZY_DiZhi_14.adTitle}</h2> 
      </div> 
      <p class="desc zy" data-type="ad" data-id="${ZY_ZhangShaShiYueLuQu_15.adId}">${ZY_ZhangShaShiYueLuQu_15.adTitle}</p> 
     </div> 
    </div> 
   </div> 
   <div class="form-wrap"> 
    <h1 class="title zy" data-type="ad" data-id="${ZY_ZaiXianLiuYan_16.adId}">${ZY_ZaiXianLiuYan_16.adTitle}</h1>
    <div class="form-con"  id="data-form">
     <div class="flex flex-wrap">
      <div class="form-input-item">
       <label class="label">姓名</label>
       <input class="input" name="msgUserName" type="text">
      </div>
      <div class="form-input-item">
       <label class="label">电话</label>
       <input class="input" name="msgTel" type="text">
      </div>
      <div class="form-input-item">
       <label class="label"><span class="requrie">*</span>邮箱</label>
       <input class="input" type="text" name="info1">
      </div>
      <div class="form-input-item">
       <label class="label">公司名称</label>
       <input class="input" type="text" name="info2">
      </div>
      <div class="form-input-item">
       <label class="label"><span class="requrie">*</span>类型</label>
       <select class="select" name="msgType">
        <option value="询价">询价</option>
        <option value="申请样品">申请样品</option>
        <option value="其他">其他</option>
       </select>
      </div>
      <div class="form-input-item">
       <label class="label">标题</label>
       <input class="input" type="text" name="info3">
      </div>
     </div>
     <div class="form-texteare-item flex ">
      <label class="label"><span class="requrie">*</span>描述</label>
      <textarea class="flex-1 content" placeholder="请输入需要咨询的信息" name="msgContent"></textarea>
     </div>
     <div  class="form-checkbox-item">
      <label>
       <input type="checkbox" name="reading">我已阅读并同意<a href="javascript;">《隐私承诺》</a>
      </label>
     </div>
     <button type="button" class="submit-btn common-btn" onclick="submit()">提交</button>
    </div>
   </div> 
  </div> 
  <jsp:include page="_footer.jsp"></jsp:include>
  <script src="https://hwfile.csxuncong.com/jiangyouyao/mobile/js/jquery.min.js"></script>
  <script src="https://hwfile.csxuncong.com/xxsw/pc/js/swiper.min.js"></script> 
  <script src="https://hwfile.csxuncong.com/xxsw/pc/js/wow.min.js"></script> 
  <script>
     window.onload = function(){
        var itemEls = document.getElementsByClassName('nav-item-hover');
        for(var i= 0; i < itemEls.length;i++){
            itemEls[i].onmouseover = function(){
                var els = this.getElementsByClassName('nav-layout');
                if(els.length) {
                    els[0].style.display = 'block'
                };
            }
            itemEls[i].onmouseout = function(){
                var els = this.getElementsByClassName('nav-layout');
                if(els.length) {
                    els[0].style.display = 'none'
                };
            }
        }
        var wow = new WOW({
            boxClass: 'wow',
            animateClass: 'animated',
            offset: 0,
            mobile: true,
            live: true
        });
        wow.init();
        var openContactUsEl = document.getElementById('openContactUs');
        var closeContactUsEl = document.getElementById('closeContactUs');
        var contactUsSildeEl = document.getElementById('contactUsSilde');
        if(openContactUsEl){
            closeContactUsEl.onclick = function () {
                contactUsSildeEl.style.right = '-124px';
                closeContactUsEl.style.display = 'none';
                openContactUsEl.style.display = 'block';
            }
            openContactUsEl.onclick = function () {
                contactUsSildeEl.style.right = 0;
                openContactUsEl.style.display = 'none';
                closeContactUsEl.style.display = 'block';
            }
        }
        
     }
</script>
  <script>
   function submit() {
    var result = {};
    var fields = $("div#data-form input[type='text']");

    for (var i = 0; i < fields.length; i++) {
     var field = fields[i];
     var name = $(field).attr('name');
     var value = $(field).val();
     if (name == 'info1') {
      if (!value) {
       alert("请填写完成信息");
       return;
      }
     }
     if (name in result) {
      result[name] += "," + value;
     } else {
      result[name] = value;
     }
    }

    var name1 = $($('.select')[0]).attr('name');
    var value1 = $($('.select')[0]).val();
    result[name1] = value1;

    if (!$($('.content')[0]).val()) {
     alert("请填写完成信息");
     return;
    }
    result[$($('.content')[0]).attr('name')] = $($('.content')[0]).val();

    console.log(result);

    var checkbox = $("div#data-form input[type='checkbox']")[0];
    if (!$(checkbox).prop('checked')) {
     alert("请勾选已阅读并同意");
    }

    $.post("${path}/do/visitor/addMsg",result,function(){
     alert("感谢您的意见！");
     location.reload();
    });
   }
  </script>
 </body>
</html>